package edu.princeton.cogsci.wn;

/** This class encapsulates the parameters for a WordNet search. The abstract
 *  base class that specifies the functionality of a search is
 *  <CODE>SearchMacro</CODE>.
 *
 *  @see SearchMacro
 *  @see SearchResults
 */
public class SearchParameters
{
  /** The search word. */
  public String word;
  
  /** The part of speech. May be <CODE>ANY_POS</CODE>. @see Constants */
  public int pos;
  
  /** The sense number. May be <CODE>ALL_SENSES</CODE>. @see Constants */
  public int sense;
  
  /** Creates a <CODE>SearchParameters</CODE> object. */
  public SearchParameters( String word, int pos, int sense )
  {
    this.word = word;
    this.pos = pos;
    this.sense = sense;
  }
  
  /** Returns a string representation of this object. Useful for displaying
   *  in a user agent (in the history menu, for example).
   */
  public String toString( )
  {
    return word + "(" + Constants.posChars[ pos ] + ":" + sense + ")";
  }
}
